#ifndef DIALPAGEPRESENTER_HPP
#define DIALPAGEPRESENTER_HPP

#include <gui/model/ModelListener.hpp>
#include <mvp/Presenter.hpp>

using namespace touchgfx;

class DialPageView;

class DialPagePresenter : public touchgfx::Presenter, public ModelListener
{
public:
    DialPagePresenter(DialPageView& v);

    /**
     * The activate function is called automatically when this screen is "switched in"
     * (ie. made active). Initialization logic can be placed here.
     */
    virtual void activate();

    /**
     * The deactivate function is called automatically when this screen is "switched out"
     * (ie. made inactive). Teardown functionality can be placed here.
     */
    virtual void deactivate();

    virtual ~DialPagePresenter() {};
		//DialPagePresenter的状态
		void DialPagePresenterState(bool enable);
		//更新日期和时间
		virtual void updateDate(uint8_t newYear, uint8_t newMonth, uint8_t newDate, uint8_t newWeekDay); 
		virtual void updateTime(uint8_t newHours, uint8_t newMinutes, uint8_t newSeconds);
		virtual void DialPageChange(uint8_t newFiveKeyFunc);
		//进入运动模式界面
		virtual void SportPageEnter(uint8_t newKeyFunc);
		//更新温度/步数/心率
		virtual void updateTempStepHeart(float newTem, unsigned long newStep, uint32_t newHeartRate);
private:
    DialPagePresenter();

    DialPageView& view;
};

#endif // DIALPAGEPRESENTER_HPP
